home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / Palettes / TTools / TToolsPalette / TBinderList.subproj / TBinderList.m < prev    next >
Encoding:
Text File  |  1995-06-12  |  967 b   |  66 lines

  1. /* TBinderList.m
  2.  * Written By:  Thomas Burkholder
  3.  *
  4.  * You may freely copy, distribute, and reuse the code in this example.
  5.  * NeXT disclaims any warranty of any kind, expressed or  implied, as to its
  6.  * fitness for any particular use.
  7.  */
  8.  
  9. #import "TBinderList.h"
  10.  
  11. @implementation TBinderList
  12.  
  13. - init
  14. {
  15.     [super init];
  16.     dataSource = nil;
  17.     return self;
  18. }
  19.  
  20. - setDataSource:anObject
  21. {
  22.     dataSource = anObject;
  23.     return self;
  24. }
  25.  
  26. - dataSource
  27. {
  28.     return dataSource;
  29. }
  30.  
  31. - updateInterface:sender
  32. {
  33.     int i;
  34.  
  35.     for(i=0;(i<numElements);i++) {
  36.         [[self objectAt:i] updateInterface:dataSource];
  37.     }
  38.     return self;
  39. }
  40.  
  41. - updateDataSource:sender
  42. {
  43.     int i;
  44.  
  45.     for(i=0;(i<numElements);i++) {
  46.         [[self objectAt:i] updateDataSource:dataSource];
  47.     }
  48.     return self;
  49. }
  50.  
  51. - read:(NXTypedStream *)stream
  52. {
  53.     [super read:stream];
  54.     dataSource=NXReadObject(stream);
  55.     return self;
  56. }
  57.  
  58. - write:(NXTypedStream *)stream
  59. {
  60.     [super write:stream];
  61.     NXWriteObject(stream,dataSource);
  62.     return self;
  63. }
  64.  
  65. @end
  66.